[cherry pick] Use TokenValidationParameter copy constructor to make a deep copy #3488
Merged
Conversation
kllysng
approved these changes
May 13, 2026
saurabhsathe-ms
approved these changes
May 27, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Cherry-picks a fix for Bug 3423710 by updating TokenValidationParameters.Clone()/copy-constructor behavior so cloned instances don’t share mutable collection state with the original, and updates tests/docs accordingly.
Changes:
- Deep-copies collection properties in the
TokenValidationParameters(TokenValidationParameters other)copy constructor (lists/dictionaries). - Updates
Clone()implementation and XML documentation to reflect the intended clone semantics. - Extends
TokenValidationParametersTests.Clone()with additional assertions around clone independence.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/Microsoft.IdentityModel.Tokens/TokenValidationParameters.cs |
Updates the copy constructor and clone docs/implementation to avoid sharing mutable collections between original and clone. |
test/Microsoft.IdentityModel.Tokens.Tests/TokenValidationParametersTests.cs |
Updates clone test expectations; should validate collection deep-copy behavior. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This was referenced Jun 2, 2026
Bump Microsoft.IdentityModel.JsonWebTokens from 8.18.0 to 8.19.0
Azure-Samples/azure-finops-agent#39
Closed
Closed
github-actions Bot
pushed a commit
to Stella-sea/ryujinx-admin
that referenced
this pull request
Jun 14, 2026
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [Microsoft.IdentityModel.JsonWebTokens](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet) | `8.18.0` → `8.19.1` |  |  | --- ### Release Notes <details> <summary>AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet (Microsoft.IdentityModel.JsonWebTokens)</summary> ### [`v8.19.1`](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/HEAD/CHANGELOG.md#8191) [Compare Source](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet@8.19.0...8.19.1) \==== #### Bug Fixes - Update `JwtSecurityTokenHandler` for `IssuerSigningKeyResolverUsingConfiguration` to take priority over `IssuerSigningKeyResolver`, matching the documented contract and the correct behavior already present in `JsonWebTokenHandler`. See [PR #​3519](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3519). ### [`v8.19.0`](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/blob/HEAD/CHANGELOG.md#8190) [Compare Source](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet@8.18.0...8.19.0) \==== #### New Features - Add ML-DSA (FIPS 204) post-quantum signature support. See [PR #​3479](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3479). - Cache custom crypto providers in CryptoProviderFactory. See [PR #​3489](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3489). #### Bug Fixes - Disable automatic redirects on default HttpClient for JKU retrieval. See [PR #​3494](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3494). - Adjust rented buffer handling in claim set parsing. See [PR #​3493](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3493). - Tidy null handling in SAML conditions validation. See [PR #​3491](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3491). - Improve validation of `jku` claim. See [PR #​3481](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3481). - Limit telemetry algorithm dimension cardinality. See [PR #​3490](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3490). - Add defensive copy of collections in ValidationParameters. See [PR #​3492](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3492). - Update TokenValidationParameter copy constructor to make a deep copy. See [PR #​3488](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3488). - Update to fail-closed when replay protection isn't configured and other DPoP hardening. See [PR #​3505](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3505). - Apply RFC 3986 section 6.2.2 normalization to DPoP `htu` comparison. See [PR #​3509](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3509). </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNzguMCIsInVwZGF0ZWRJblZlciI6IjQzLjE3OC4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=--> Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/136
This was referenced Jun 14, 2026
sondresjolyst
pushed a commit
to sondresjolyst/garge-api
that referenced
this pull request
Jun 15, 2026
) Updated [System.IdentityModel.Tokens.Jwt](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet) from 8.18.0 to 8.19.1. <details> <summary>Release notes</summary> _Sourced from [System.IdentityModel.Tokens.Jwt's releases](https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/releases)._ ## 8.19.1 ## Bug Fixes - Update `JwtSecurityTokenHandler` for `IssuerSigningKeyResolverUsingConfiguration` to take priority over `IssuerSigningKeyResolver`, matching the documented contract and the correct behavior already present in `JsonWebTokenHandler`. See [PR #3519](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3519). ## 8.19.0 ## New Features - Add ML-DSA (FIPS 204) post-quantum signature support. See [PR #3479](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3479). - Cache custom crypto providers in CryptoProviderFactory. See [PR #3489](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3489). ## Bug Fixes - Disable automatic redirects on default HttpClient for JKU retrieval. See [PR #3494](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3494). - Adjust rented buffer handling in claim set parsing. See [PR #3493](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3493). - Tidy null handling in SAML conditions validation. See [PR #3491](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3491). - Improve validation of `jku` claim. See [PR #3481](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3481). - Limit telemetry algorithm dimension cardinality. See [PR #3490](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3490). - Add defensive copy of collections in ValidationParameters. See [PR #3492](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3492). - Update TokenValidationParameter copy constructor to make a deep copy. See [PR #3488](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3488). - Update to fail-closed when replay protection isn't configured and other DPoP hardening. See [PR #3505](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3505). - Apply RFC 3986 section 6.2.2 normalization to DPoP `htu` comparison. See [PR #3509](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#3509). Commits viewable in [compare view](AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet@8.18.0...8.19.1). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This was referenced Jun 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cherry picks the fix for Bug 3423710: TokenValidationParameters.Clone does not make a deep copy